//
//  UserGuideViewController.m
//  MyProject
//
//  Created by dllo on 15/11/7.
//  Copyright (c) 2015年 蓝鸥0825. All rights reserved.
//

#import "UserGuideViewController.h"
#import "WordViewController.h"

#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height

@interface UserGuideViewController ()

@end

@implementation UserGuideViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self initGuide];   //加载新用户指导页面
    
    
    
}



- (void)initGuide
 {
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    [scrollView setContentSize:CGSizeMake(WIDTH * 2, 0)];
    [scrollView setPagingEnabled:YES];  //视图整页显示
    //    [scrollView setBounces:NO]; //避免弹跳效果,避免把根视图露出来

     UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    [imageview setImage:[UIImage imageNamed:@"c.jpg"]];
    [scrollView addSubview:imageview];
    [imageview release];
  
    UIImageView *imageview1 = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH, 0, WIDTH, HEIGHT)];
    [imageview1 setImage:[UIImage imageNamed:@"d.jpg"]];
    [scrollView addSubview:imageview1];
    [imageview1 release];
    imageview1.userInteractionEnabled = YES;
   
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];//在imageview3上加载一个透明的button
    button.frame = CGRectMake(WIDTH / 100 * 35, HEIGHT / 100 * 81, WIDTH / 100 * 30, HEIGHT / 100 * 6);
    [button addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    [imageview1 addSubview:button];
     
    [self.view addSubview:scrollView];
    [scrollView release];


  }


- (void)click:(UIButton *)button{
    self.block();

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


@end
